/**
 * 
 */
package com.sicocre.beans;

import java.io.Serializable;

/**
 * @author malmanza
 *
 */
public class Gerente extends EmpleadoBean implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4119679208220352499L;
	private Sucursal sucursal;
	
	public Gerente(){
		this.sucursal = new Sucursal();
	}

	/**
	 * @return the sucursal
	 */
	public Sucursal getSucursal() {
		return sucursal;
	}

	/**
	 * @param sucursal the sucursal to set
	 */
	public void setSucursal(Sucursal sucursal) {
		this.sucursal = sucursal;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((sucursal == null) ? 0 : sucursal.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (!super.equals(obj)) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		Gerente other = (Gerente) obj;
		if (sucursal == null) {
			if (other.sucursal != null) {
				return false;
			}
		} else if (!sucursal.equals(other.sucursal)) {
			return false;
		}
		return true;
	}	
	
	
	
}
